<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/2/3
 * Time: 16:28
 */
include '../db_conf.php';;
//接收数据
$uname=$_REQUEST['uphone'];
$pwd=$_REQUEST['upwd'];
$umail=$_REQUEST['uphone']."@being.com";
$uphone=$_REQUEST['uphone'];
$t=time();
$code= substr($t,-6);
$upwd=md5(md5($pwd).$code);
//echo $uname;

$sql=mysql_query("INSERT INTO  fanwe_user (user_name, user_pwd, create_time,update_time, login_ip, group_id, is_effect, is_delete, email, mobile, score, money, verify,code, pid, login_time, referral_count, password_verify, integrate_id, sina_id, renren_id, kaixin_id, sohu_id, lottery_mobile, lottery_verify,verify_create_time, tencent_id, referer, login_pay_time, focus_count, focused_count, province_id, city_id, my_intro, is_merchant, merchant_name, is_daren, daren_title, step, byear, bmonth, bday, topic_count, fav_count, faved_count, dp_count, insite_count, outsite_count, level_id, POINT, sina_app_key, sina_app_secret, is_syn_sina, tencent_app_key, tencent_app_secret, is_syn_tencent, t_access_token, t_openkey, t_openid, sina_token, qq_id, alipay_id) VALUES ('".$uname."', '".$upwd."', UNIX_TIMESTAMP(CURRENT_TIMESTAMP), UNIX_TIMESTAMP(CURRENT_TIMESTAMP), ':1', '1', '1', '0', '".$umail."', '".$uphone."', '100', '0', '', '".$code."', '0', UNIX_TIMESTAMP(CURRENT_TIMESTAMP), '0', '', '0', '0', '0', '0', '0', '', '', '0', '', '', '0', '0', '0', '0', '0', '', '0', '', '0', '', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '2', '100', '', '', '0', '', '', '0', '', '', '', '', '', '') ");

//判断插入成功还是失败
if (!$sql){
    $arr = array ('type'=>'0');
    $jarr =array('list' => $arr);
    print(json_encode($jarr));
    return 0;
}
else{
    $arr = array ('type'=>'1');
    $jarr =array('list' => $arr);
    print(json_encode($jarr));
    return 0;
}
mysql_close();

?>


